﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WMS.Model;

namespace WMS.Repository.IRepository
{
    public interface IBaseRepository<TEntity> where TEntity : IBaseModel
    {
        Task<List<TEntity>> QueryAsync();
        Task<TEntity> GetAsync(long id);
        Task<bool> AddAsync(TEntity entity);
        Task<int> DeleteAsync<TEntity>(int id) where TEntity : class, IBaseModel, new();
        Task<bool> UpdateAsync(TEntity entity);

        Task<TEntity> GetById(long id);
    }
}
